home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Demos / Paper Planes / Gloss / 00021.ls < prev    next >
Encoding:
Text File  |  1994-08-18  |  726 b   |  26 lines

  1. on exitFrame
  2.   global ReadGlossary
  3.   if ReadGlossary then
  4.     set ReadGlossary to 0
  5.     set fileName to the pathName & "Glossary:Gloss.txt"
  6.     set theFile to FileIO(mnew, "read", fileName)
  7.     set lineNum to 1
  8.     set done to 0
  9.     repeat while not done
  10.       set aLine to theFile(mReadLine)
  11.       if aLine = EMPTY then
  12.         set done to 1
  13.         next repeat
  14.       end if
  15.       set aWord to item 1 of aLine
  16.       put aWord & RETURN into line lineNum of field "Glossary"
  17.       set theLabel to item 2 of aLine
  18.       set theVisual to item 3 of aLine
  19.       put theLabel & "," & theVisual into line lineNum of field "GlossaryData"
  20.       set lineNum to lineNum + 1
  21.     end repeat
  22.     theFile(mdispose)
  23.   end if
  24.   cursor(-1)
  25. end
  26.